package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.CmsCategory;
import com.ruoyi.system.mapper.CmsCategoryMapper;
import com.ruoyi.system.service.ICmsCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CmsCategoryServiceImpl implements ICmsCategoryService {

    @Resource
    private CmsCategoryMapper cmsCategoryMapper;

    @Override
    public CmsCategory selectCmsCategoryById(Long categoryId) {
        return cmsCategoryMapper.selectCmsCategoryById(categoryId);
    }

    @Override
    public List<CmsCategory> selectCmsCategoryList(CmsCategory category) {
        return cmsCategoryMapper.selectCmsCategoryList(category);
    }

    @Override
    public int insertCmsCategory(CmsCategory category) {
        return cmsCategoryMapper.insertCmsCategory(category);
    }

    @Override
    public int updateCmsCategory(CmsCategory category) {
        return cmsCategoryMapper.updateCmsCategory(category);
    }

    @Override
    public int deleteCmsCategoryByIds(Long[] categoryIds) {
        return cmsCategoryMapper.deleteCmsCategoryByIds(categoryIds);
    }

    @Override
    public int deleteCmsCategoryById(Long categoryId) {
        return cmsCategoryMapper.deleteCmsCategoryById(categoryId);
    }
}


